package com.wxl.www.wxl.shiro.controller;

import com.wxl.www.wxl.shiro.entity.SysPermission;
import com.wxl.www.wxl.shiro.entity.UserInfo;
import com.wxl.www.wxl.shiro.service.SysPermissionService;
import com.wxl.www.wxl.shiro.utils.AOP.LoginUserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/menu")
public class MeunController {

    @Autowired
    private SysPermissionService sysPermissionService;


    @PostMapping("/getAll")
    @ResponseBody
    public List<SysPermission> getMeunAll(@LoginUserInfo() UserInfo userInfo){
        return sysPermissionService.getMenuAll(userInfo);
    }

}
